package IO;

import java.io.FileInputStream;

public class FileStreamDemo {
    public static void main(String[] args) {
        FileInputStream fis = null;
        try{
            fis = new FileInputStream("d:/a.jpg");
            int temp = 0;
            while((temp = fis.read()) != -1){
                System.out.println(temp);
            }
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            try{
                if(fis != null){
                    fis.close();
                }
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }
}
